<?php
foreach ($query->result() as $row){
	$id_project = $row->id_project; 
	$vl_value = $row->vl_value;
}
echo "ID_PROJECT = ".$id_project;
?>
<br/><br/>
<div class="well">
	<h2>Aguardando pagamento...</h2>
	<div class='alert alert-error'>
		<h3>Seu pagamento ainda não foi liberado</h3>
		<p>Por favor clique no link abaixo para concluir o pagamento através do paypal</p>
		<script src="<?=base_url()?>assets/js/paypal-button.min.js?merchant=luiz@tecsites.com.br"  
		    data-button="buynow" 
		    data-button_subtype="servicves" 
		    data-name="Plano Teste" 
		    data-item_number="<?=$id_project?>" 
		    data-amount="5" 
		    data-currency="BRL" 
		    data-env="sandbox" 
		    data-locale="pt_BR" 
		    data-return="<?=base_url()."project/view/".$id_project?>" 
		    data-callback="http://wdcloth.com/pay/payd"
		></script>
		<script src="<?=base_url()?>assets/js/paypal-button.min.js" type="text/javascript"></script>
		
		<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
			<input type="hidden" name="cmd" value="_xclick">
			<input type="hidden" name="business" value="luiz@tecsites.com.br">
			<input type="hidden" name="lc" value="BR">
			<input type="hidden" name="item_name" value="Plano 1 (wdcloth.com)">
			<input type="hidden" name="item_number" value="<?=$id_project?>">
			<input type="hidden" name="amount" value="<?=$vl_value?>">
			<input type="hidden" name="currency_code" value="BRL">
			<input type="hidden" name="button_subtype" value="services">
			<input type="hidden" name="no_note" value="1">
			<input type="hidden" name="no_shipping" value="1">
			<input type="hidden" name="rm" value="1">
			<input type="hidden" name="notify_url" value="http://wdcloth.com/pay/payd">
			<input type="hidden" name="return" value="<?=base_url()."project/view/".$id_project?>">
			<input type="hidden" name="cancel_return" value="<?=base_url()."project/view/".$id_project?>">
			<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
			<input type="image" src="https://www.paypalobjects.com/pt_BR/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="PayPal - A maneira mais fácil e segura de efetuar pagamentos online!">
			<img alt="" border="0" src="https://www.paypalobjects.com/pt_BR/i/scr/pixel.gif" width="1" height="1">
		</form>
	</div>
</div>